function quick(arr,low,high){
    if(low > high) return
    let i = low -1
    let pivot = arr[high]
    for (let j = low; j < high; j++) {
        if(arr[j]<pivot){
            i++
            let temp = arr[j]
            arr[j] = arr[i]
            arr[i] = temp
        }
    }
    let temp = arr[i+1]
    arr[i+1] = arr[high]
    arr[high] = temp
    quick(arr,low,i)
    quick(arr,i+2,high)

}
let array = [100, 23, 45, 12, 25, 3, 90, 34]
quick(array,0,array.length-1)
console.log(array)